Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GetCiphertextLength for CBC, CFB, and ECB. #45003

Merged
merged 2 commits into from
Nov 21, 2020

Conversation

vcsjones
Copy link
Member

Adds GetCiphertextLength public APIs.

Contributes to #2406

@Dotnet-GitSync-Bot
Copy link
Collaborator

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented Nov 20, 2020

Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @jeffhandley
See info in area-owners.md if you want to be subscribed.

Issue Details

Adds GetCiphertextLength public APIs.

Contributes to #2406

Author: vcsjones
Assignees: -
Labels:

area-System.Security, new-api-needs-documentation

Milestone: -

* Too many empty lines.
* Change CryptographicException to InvalidOperationException.
* Add a remark that CFB accepts and valid feedback size, even if
    the underlying algorithm does not support that feedback size.
@EgorBo
Copy link
Member

EgorBo commented Nov 20, 2020

Speaking of new APIs, are there any plans to add an API to specify padding for AesGcm and AesCcm ?

@bartonjs
Copy link
Member

are there any plans to add an API to specify padding for AesGcm and AesCcm?

No, because padding doesn't normally come up with those. Do you know of a case where it does?

@vcsjones
Copy link
Member Author

vcsjones commented Nov 20, 2020

@EgorBo

padding for AesGcm and AesCcm ?

GCM / CCM is stream-like, so it does not require padding. One bit in, one bit out.

Edit: Always 20 seconds too slow.

@bartonjs bartonjs merged commit 028cde2 into dotnet:master Nov 21, 2020
@vcsjones vcsjones deleted the 2406-ciphertext-length branch November 21, 2020 00:57
@ghost ghost locked as resolved and limited conversation to collaborators Dec 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants